import Vue from 'vue';
import Vuex from 'vuex';
// import Cookies from 'js-cookie';
import mutations from './mutations';
import actions from './actions';
import getters from './getters';
Vue.use(Vuex);

const state = {
  isfold: false,  //  sidebar缩进
  links: '',
  names: '',
  lang: '',
  menu: [],
  name: '',
  judge: null,
  sprinkler: [],
  capture: [],  //  抓拍
  local: [],  // 车辆位置
  language: window.sessionStorage.getItem('language') || 'zh',
  showLoading: false, // 全局loading加载
  isFirstLoad: true, // 是否是第一次进入首页
  visitedViews: [],
  cachedViews: []
};

export default new Vuex.Store({
  state,
  getters,
  actions,
  mutations
});
